<div class="clear_both"></div>
<div class="main_container">
<div class="sub_tabs">
<ul class="idTabs"> 
  <li><a href="#information_tab">Basic Info</a></li> 
  <li><a href="#holidays_tab">Holidays</a></li> 
  <li><a href="#payroll_period_tab">Payroll Period</a></li> 
</ul>
</div>
<div id="information_tab">
<div class="clear_both"></div>
<fieldset>
<legend>BASIC INFORMATION</legend>
<table width="500" cellpadding="0" cellspacing="0">
	<tr>
		<td class="classic" width="100">Company</td>
		<td class="classic">Time Republic</td>
	</tr>
	<tr class="fill_odd">
		<td class="classic">Address</td>
		<td class="classic">Gerardo Ouano Street, Opao, Mandaue, Cebu, 6014</td>
	</tr>
	<tr class="fill_even">
		<td class="classic">Contact Person</td>
		<td class="classic">Arman</td>
	</tr>
	<tr class="fill_odd">
		<td class="classic">Email</td>
		<td class="classic">arman@timerepublic.com</td>
	</tr>
	<tr class="fill_even">
		<td class="classic">Contact #</td>
		<td class="classic">09224925892</td>
	</tr>
</table>
</fieldset>
</div>

<div id="holidays_tab">
<div class="clear_both"></div>
<fieldset>
<legend>HOLIDAYS</legend>
<table width="500" cellpadding="0" cellspacing="0">
	<tr>
		<td class="classic" width="200">Holiday</td>
		<td class="classic" width="200">Date(s)</td>
		<td class="classic">Type</td>
	</tr>
	<?php 
	$odd = true;
	foreach($holidays as $holiday){?>
	<tr class="fill_<?php echo $odd?'odd':'even'?>">
		<td class="classic"><?php echo $holiday->name?></td>
		<td class="classic">
		<?php 
			
			if($holiday->date_start != $holiday->date_end){
				echo "{$holiday->date_start} to {$holiday->date_end}";
			}else{
				echo "{$holiday->date_start}";
			}
		
		?>
		</td>
		<td class="classic"><?php echo ucfirst($holiday->type_name)?></td>
	</tr>
	<?php 
		$odd = !$odd;
	} 
	?>
	<tr>
		<td colspan="3" style="padding:5px">
			<a href="#">Add Holiday</a>
		</td>
	</tr>
</table>
</fieldset>
</div>

<div id="payroll_period_tab">
<div class="clear_both"></div>
<fieldset>
<legend>PAYROLL PERIOD</legend>
<table width="300" cellpadding="0" cellspacing="0">
<tr>
	<td class="classic">Start</td>
	<td class="classic">End</td>
</tr>
<?php 
$cnt = 0;
foreach ($periods as $period):?>
<?php 
$cnt++;
$style = $cnt % 2?'odd':'even';
?>
	<tr class="fill_<?php echo $style?>">
		<td class="classic"><?php echo date('M d, Y', strtotime($period->date_start));?>
		<td class="classic"><?php echo date('M d, Y', strtotime($period->date_end))?>
	</tr>
<?php endforeach;?>
<tr>
	<td colspan="2" style="padding:5px"><a href="#">Add Period</a></td>
</tr>
</table>
</fieldset>
</div>

</div>